home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / gnu / gnu_tile_forth.lha / tst / relations.run < prev    next >
Text File  |  1992-05-19  |  2KB  |  90 lines

  1. TILE Forth version 3.32, Copyright (c) 1990, by Mikael Patel
  2. Loading Relations test...
  3. Loading Relations definitions...
  4. Loading Structure definitions...
  5. Loading Block definitions...
  6. 1: Some simple items and relations between them
  7. items: d c b a 
  8. a:relations: d c b a 
  9. b:relations: 
  10. c:relations: 
  11. d:relations: 
  12. a:values: d: 13 c: 12 b: 11 a: 10 
  13. a:values: d: 13 c: 12 b: 11 
  14. a:values: c: 12 b: 11 
  15. Joe:values: profession: 1180776 address: 1180744 
  16.  
  17. 2: Reflexive and symmetric relations
  18. 3: Directions and opposite directions
  19. items: opposite west east south north profession address Joe d c b a 
  20. west opposite east
  21. east opposite west
  22. south opposite north
  23. north opposite south
  24.  
  25. 4: A small map with locations and paths
  26. items: Hotel Drugstore Macdonalds HardwareShop opposite west east south north profession address Joe d c b a 
  27. Hotel:relations: west south east 
  28. Macdonalds:relations: west north 
  29. HardwareShop:relations: west 
  30. Drugstore:relations: east 
  31.  
  32. 5: Sets, Bags and Dictionaries using relations
  33. items: aDictionary aBag aSet x Hotel Drugstore Macdonalds HardwareShop opposite west east south north profession address Joe d c b a 
  34. 0 -1 10 20 0 0 100 
  35. aSet:relations: 
  36. aBag:relations: 
  37. aDictionary:relations: x 
  38.  
  39. 6: Item relation database dump example
  40. item is-a-string
  41. item is-an-item
  42. item dump
  43. item aDictionary
  44. item aBag
  45. item aSet
  46. item x
  47. item Hotel
  48. item Drugstore
  49. item Macdonalds
  50. item HardwareShop
  51. item opposite
  52. item west
  53. item east
  54. item south
  55. item north
  56. item profession
  57. item address
  58. item Joe
  59. item d
  60. item c
  61. item b
  62. item a
  63.  
  64. is-an-item dump  put-relation
  65. 100 x  put-relation
  66. Hotel west  put-relation
  67. Macdonalds south  put-relation
  68. Hotel east  put-relation
  69. Macdonalds east  put-relation
  70. Drugstore west  put-relation
  71. Hotel north  put-relation
  72. Hotel west  put-relation
  73. is-an-item dump  put-relation
  74. is-an-item dump  put-relation
  75. east opposite  put-relation
  76. is-an-item dump  put-relation
  77. west opposite  put-relation
  78. is-an-item dump  put-relation
  79. north opposite  put-relation
  80. is-an-item dump  put-relation
  81. south opposite  put-relation
  82. is-a-string dump  put-relation
  83. is-a-string dump  put-relation
  84. " Forth Hacker" profession  put-relation
  85. " Forth road 4, Forthiana" address  put-relation
  86. 12 c  put-relation
  87. 11 b  put-relation
  88.  
  89.  
  90.